package ${packageName};

<#list cacheImports as imports>
import ${imports};
</#list>

public class ${d_tableName}Cache {
	<#list indexKeys as index>
	/**
	 * 根据(<#list index.columnNames as columnName> ${columnName} </#list>) 查询
	 */
	<#if index.unique>
	public static ${d_tableName} getBy<#list index.d_columnNames as d_columnName>${d_columnName}</#list>(${index.all_basicType_x_columnName}){
		SK_CacheType cacheType = ${config}.getCacheType();
		if (SK_CacheType.Map.equals(cacheType)|| SK_CacheType.RedisAndMap.equals(cacheType)) {

		} else if (SK_CacheType.Redis.equals(cacheType)) {

		} else {
			return ${d_tableName}Dao.getBy<#list index.d_columnNames as d_columnName>${d_columnName}</#list>(${index.all_x_columnName});
		}
		return null;
	}
	
	<#else>
	public static List<${d_tableName}> getBy<#list index.d_columnNames as d_columnName>${d_columnName}</#list>(${index.all_basicType_x_columnName}){
		SK_CacheType cacheType = ${config}.getCacheType();
		if (SK_CacheType.Map.equals(cacheType)|| SK_CacheType.RedisAndMap.equals(cacheType)) {

		} else if (SK_CacheType.Redis.equals(cacheType)) {

		} else {
			return ${d_tableName}Dao.getBy<#list index.d_columnNames as d_columnName>${d_columnName}</#list>(${index.all_x_columnName});
		}
		return null;
	}
	
	</#if>
	</#list>
}